<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <link href="../css/element.css" rel="stylesheet"/>
    <link href="../css/styleindex.css" rel="stylesheet"/>
    <link href="../css/swiper.min.css" rel="stylesheet"/>
    <style>
    .el-input__inner{
      border: 0;
      font-size: 1rem;
      text-align: center;
    }.el-input__prefix{
      display: none;
    }
    </style>
</head>
<body style="background:#EFF0F4;">

  <div class="mui-content">
    <div id="vm" class="x-examok" v-cloak>
      <div class="x-header-g" id="header">
        <a class="x-header-arrow" @click="api.closeWin()"></a>
        <div class="x-header-t">验收详情</div>
      </div>
     
        <!--  -->
        <div class="">
          <template>
            <el-table :data="tabledata">
              <el-table-column label="工作站" width="90" fixed>
                <template slot-scope="scope">
                  {{scope.row.ws_title}}
                </template>
              </el-table-column>
              <el-table-column label="品名" width="90">
                <template slot-scope="scope">
                  {{scope.row.title}}
                </template>
              </el-table-column>
              <el-table-column label="购规格" width="">
                <template slot-scope="scope">
                  {{scope.row.buy_unit}}
                </template>
              </el-table-column>
              <el-table-column label="审核量" width="130">
                <template slot-scope="scope">
                    {{scope.row.check_num}}
                </template>
              </el-table-column>
              <el-table-column label="验收量" width="130">
                <template slot-scope="scope">
                    {{scope.row.save_num}}
                </template>
              </el-table-column>
              <el-table-column label="单价" width="100">
                <template slot-scope="scope">
                    {{scope.row.unit_price}}
                </template>
              </el-table-column>
              <el-table-column label="金额" width="">
                <template slot-scope="scope">
                  {{scope.row.save_num*scope.row.unit_price}}
                </template>
              </el-table-column>
            </el-table>
          </template>
          <div class="x-table-desc">总金额：{{allmoney}}</div>
          <div class="x-table-desc">验收人：{{askname}}</div>
        </div>
        
		
    </div>
  </div>

  <script type="text/javascript" src="../script/vue.js"></script>
  <script type="text/javascript" src="../script/element.js"></script>
  <script type="text/javascript" src="../script/api.js"></script>
  <script type="text/javascript" src="../script/base.js"></script>
  <script type="text/javascript" src="../script/jquery-1.11.1.min.js"></script>
  <script type="text/javascript" src="../script/swiper.min.js"></script>
	<script>
apiready = function () {
    $api.fixStatusBar($api.byId('header'));
    var tid = api.pageParam.id;

    //
    var vm = new Vue({
      el:'#vm',
      data(){
        return{
          tabledata:[],
          askname:'',
          allmoney:0,
          thid:0,
        }
      },
      created:function() {
        var that=this;


      },
      mounted:function(){
        var that=this;
        that.thid = tid;
        that.getdata()
        
      },
      methods: {
        getdata:function(){
            let that=this;
          api.ajax({
            url:baseurl+'api/material/saveDetail',
            methods:'get',
            data:{
              values:{
                sec: $api.getStorage('apptoken'),
                id:that.thid
              }
            }
          },function(ret,err){
            if(ret){
              api.hideProgress();
              console.log(JSON.stringify(ret));
              if(ret.status == 1){
                that.tabledata = ret.data.list;
                that.askname = ret.data.save_username;
                that.allmoney = ret.data.total_price;
              }else{
                api.toast({
                    msg: ret.msg,
                    duration: 3000,
                    location: 'bottom'
                });
              }
            }else{
              api.hideProgress();
              console.log(JSON.stringify(err));
              api.toast({
                  msg: err.msg,
                  duration: 3000,
                  location: 'bottom'
              });
            }
          })
        },
      }
    })
	}

	</script>
</body>
</html>
